<template>
	<view>
		<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text"
			activeColor="#808080"></uni-segmented-control>
		<view class="content">
			<view v-show="current === 0">
				<view class="coupons">
					<view class="icon">
						<image src="~@/static/images/yhq.webp" mode="">
						</image>
					</view>
					<view class="profile">
						<view class="name">
							<view class="t">代金券</view>
							<view class="n">测试口令</view>
						</view>
						<view class="price">
							<view class="tj">满0</view>
							<view class="amount">
								<text>￥</text>
								4
							</view>
						</view>
						<view class="btn">立即领取</view>
					</view>
				</view>
				
				<view class="coupons">
					<view class="icon">
						<image src="~@/static/images/yhq.webp" mode="">
						</image>
					</view>
					<view class="profile">
						<view class="name">
							<view class="t">代金券</view>
							<view class="n">测试口令</view>
						</view>
						<view class="price">
							<view class="tj">满0</view>
							<view class="amount">
								<text>￥</text>
								4
							</view>
						</view>
						<view class="btn">立即领取</view>
					</view>
				</view>
			</view>
			<view v-show="current === 1">
				<view class="centre">
					<view class="ionc">
						<image src="static/images/yhq.webp" mode="">
						</image>
					</view>
					<view class="explain">
						暂无优惠券
						<view class="tips">
							可以去看看可领取优惠券哦～
						</view>
					</view>
				</view>
			</view>
			<view v-show="current === 2">
				<view class="centre">
					<view class="ionc">
						<image src="static/images/yhq.webp" mode="">
						</image>
					</view>
					<view class="explain">
						暂无优惠券
						<view class="tips">
							可以去看看可领取优惠券哦～
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				items: ['可领', '可用', '失效'],
				current: 0
			};
		},

		methods: {
			onClickItem(e) {
				if (this.current != e.currentIndex) {
					this.current = e.currentIndex;
				}
			}
		}
	};
</script>
<style scoped>
	page {
		background-color: #FFFFFF;
	}

	.coupons {
		display: flex;
		justify-content: space-between;
		margin-top: 24rpx;
		margin-left: 24rpx;
		width: 702px;
		height: 258px;
		background-color: #ffffff;
		box-shadow: 0 0 16px 0 rgb(36 44 69 / 20%);
		border-radius: 8px;
	}

	.icon {
		margin-left: 64px;
		margin-top: 44px;
		width: 160px;
		height: 144px;
	}

	image {
		width: 160rpx;
		height: 144rpx;
	}

	.profile {
		width: 240px;
		height: 258px;
		display: flex;
		flex-direction: column;
		align-items: flex-end;
	}

	.name {
		display: flex;
		margin-top: 33px;
	}

	.t {
		width: 80px;
		height: 30px;
		background: #feb21c;
		border-radius: 4px;
		font-family: PingFangSC-Medium;
		font-size: 20px;
		color: #fff;
		letter-spacing: 0;
		line-height: 30px;
		text-align: center;
	}

	.n {
		margin-left: 16px;
		margin-right: 24px;
		font-family: PingFangSC-Medium;
		font-size: 30px;
		color: #333;
		letter-spacing: 0;
		line-height: 30px;
	}

	.price {
		display: flex;
		align-items: baseline;
		margin-top: 10px;
		width: 124px;
	}

	.tj {
		font-family: PingFangSC-Regular;
		font-size: 20px;
		color: #999;
		letter-spacing: 0;
		line-height: 20px;
	}

	.amount {
		font-family: PingFangSC-Medium;
		font-size: 56px;
		color: #feb21c;
		letter-spacing: 0;
		line-height: 56px;
		margin-top: 24px;
		margin-left: 10px;
	}

	.price text {
		font-family: PingFangSC-Regular;
		font-size: 20px;
		color: #feb21c;
		letter-spacing: 0;
		line-height: 20px;
	}

	.btn {
		margin-top: 24px;
		width: 182px;
		height: 60px;
		text-align: center;
		background: #fff;
		border: 2px solid #979797;
		border-right: none;
		border-radius: 200px 2px 2px 200px;
		font-family: PingFangSC-Regular;
		font-size: 24px;
		color: #999;
		letter-spacing: 0;
		line-height: 60px;
	}

	.centre {
		width: 750px;
		height: 285px;
		font-size: 32px;
		margin: 200px auto;
	}

	.explain {
		height: 93px;
		text-align: center;
		line-height: 93px;
	}

	.tips {
		font-size: 24px;
		color: #999;
	}
	.ionc{
		margin: auto;
	}
</style>
